<template>
  <div>
    <div @click="alert(2)">{{ name }}</div>
    <router-link to="/"> 主页面 </router-link>
  </div>
</template>
<script setup>
import { reactive, toRefs, onMounted } from 'vue'
import { UserStore } from '../../store/modules/login'
const user = new UserStore()
const data = reactive({
  name: '登录'
})
const { name } = toRefs(data)
const alert = (e) => {
  location.href = '#/'
}
onMounted(() => {
  console.log(user.token)
})
</script>
<style lang="scss" scoped></style>
